home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 001a / commo51.zip / MOSTHOST.MAC < prev    next >
Text File  |  1991-12-21  |  26KB  |  749 lines

  1.                              MOSTHOST.MAC
  2.  
  3.    Shad Muegge,
  4.    {COMMO} registration number 24,
  5.    and sysop of The Babble Underground, (707) 575-0636.
  6.  
  7. -------------------------------------------------------------------------------
  8. {:ALR} {MACL COMMO.MAC}  *  ALT-R returns to COMMO.MAC
  9. -------------------------------------------------------------------------------
  10.  
  11. {:setup}                          * Setup MOSTHOST options
  12. -------------------------------------------------------------------------------
  13. -Configuration Items--------------Description----------------------------------
  14. -------------------------------------------------------------------------------
  15.  {LIGH Y}                         Modem signal lights
  16.  {SETV dospassword,PASSWORD}      Password to access to DOS menu
  17.  {SETV filedir,%_home%MHFILE\}    Directory for file transfer files
  18.  {SETV datadir,%_home%MHDATA\}    Directory for host data files (passwords)
  19.  {SETV protodir,%_home}           Directory where DSZ, GSZ, HSLINK reside,
  20.                                     must have "\" at the end (%_home has it)
  21.  {SETV autobaud,n}                Autobaud (set to no for locked serial port)
  22.  {SETV inact_time,120}            Inactivity timer, seconds, 0=none
  23.  {SETV attention_string,AT|}      String to get the modem's attention
  24.  {SETV ring_string,RING}          String sent from modem to indicate a ring
  25.  {SETV connect_string,CONNECT}    Result string for a successfull connection
  26. -------------------------------------------------------------------------------
  27.  
  28.         {CLEA}
  29.         {LOCA n}
  30.         {SPOC y}
  31.         {DISP 1,1,7,Setup|}
  32.         {SETE WF3}
  33.         {SEND %attention_string}            * Make sure the PARAM takes effect
  34.  
  35.         {IFEX %datadir%DATA.MHS,ST2}        * Check for data file
  36.         {SETV userno,0}
  37.         {CALL write_data}
  38. {:ST2}
  39.         {local y}
  40.         {RETURN}
  41.  
  42. --------------------------------------------* General functions ---------------
  43. {:cls}                                      * Clear the screen
  44.         {SEND ^L}
  45.         {RETURN}
  46.  
  47. {:press_any_key}                            * Pause until a key is pressed
  48.         {SEND ^J^MPress Any Key:}
  49.         {SETG %inact_time,time_out}
  50.         {GETS-H temp,1,PK}
  51. {:PK}   {setv temp}
  52.         {SEND ^J^M}
  53.         {RETURN}
  54.  
  55. {:dsp_file}                                 * Display a file
  56.         {IFEX %dump_file,,DF5}              * IN: %dump_file
  57.         {SETV count,0}
  58.         {ROPE %dump_file,DF3}
  59. {:DF1}  {READ dline}
  60.         {SEND ^M%dline^J^M}
  61.         {INCR count}
  62.         {COMP count,23}   {IFCO DF4}
  63.         {GOTO DF1}
  64. {:DF2}  {RCLOSE}
  65. {:DF3}  {SETV dline}
  66.         {SETV ch}
  67.         {SETV count}
  68.         {RETURN}
  69.  
  70. {:DF4}  {SETV count,0}
  71.         {SEND ^MMore [Y],N,C: }
  72.         {GETS-H ch,1,DF1}
  73.         {COMP ch,n}   {IFCO DF2}
  74.         {COMP ch,y}   {IFCO DF1}
  75.         {COMP ch,c}   {IFCO ,DF4}
  76.         {SETV count,26}
  77.         {GOTO DF1}
  78.  
  79. {:DF5}  {SEND ^J^M^GError: File not found: %dump_file}
  80.         {CALL press_any_key}
  81.         {RETURN}
  82.  
  83. {:menu}                                     * Get menu selection
  84.         {CALL clear_comm}                   * OUT: %ch
  85.         {SEND %prompt [%_tim]: }            * %ch = ~, if user hit CR at prompt
  86.         {SETG %inact_time,time_out}         
  87.         {GETS-H ch,1,MN1}
  88.  
  89.         {SEND ^J^M}
  90.         {COMP ch,*}   {IFCO time_out}
  91.         {GOTO MN2}
  92.  
  93. {:MN1}  {SETV ch,~}
  94.         {SEND ^J^M}
  95. {:MN2}  {RETURN}
  96.  
  97. {:clear_comm}                               * Clear any chars in buffer
  98.         {SETG ,,n}
  99. {:CC1}  {COMP _nci,0} {IFCO CC2}            
  100.         {GETS-H ch,1,CC1} {GOTO CC1}
  101. {:CC2}  {SETV ch}
  102.         {RETURN}
  103.  
  104. {:get_protocol}                             * Get protcol selection
  105.         {CALL cls}                          * OUT: %protocol
  106.         {SEND ┌───────────────────────────────────────────────────┐^J^M}
  107.         {SEND │                    Protocols                      │^J^M}
  108.         {SEND └───────────────────────────────────────────────────┘^J^M}
  109.         {SEND                     [Z] Zmodem^J^M}
  110.         {SEND                     [Y] Ymodem^J^M}
  111.         {SEND                     [K] Xmodem^J^M}
  112.         {SEND                     [H] HS/Link^J^M^J^M}
  113.         {SETV prompt,Protocol:}
  114.         {CALL menu}
  115.         {COMP ch,~}   {IFCO PG2}
  116.         {COMP ch,z}   {IFCO PG1}
  117.         {COMP ch,y}   {IFCO PG1}
  118.         {COMP ch,k}   {IFCO PG1}
  119.         {COMP ch,h}   {IFCO ,PG2}
  120. {:PG1}  {SETV protocol,%ch}
  121. {:PG2}  {RETURN}
  122.  
  123. {:send_hslink}                              * HSLINK download subroutine
  124.         {SEND ^J^MStart your HS/Link download now.}
  125.         {EXEC-D %protodir%HSLINK.EXE -p%_por %files}
  126.         {COMP %_err,0}
  127.         {RETURN}
  128.  
  129. {:send_zmodem}                              * ZMODEM download subroutine
  130.         {SEND ^J^MStart your Zmodem download now.}
  131.         {EXEC-D %protodir%%dszprog port %_por ha both sz %files}
  132.         {COMP %_err,0}
  133.         {RETURN}
  134.  
  135. {:send_ymodem}                              * YMODEM download subroutine
  136.         {SEND ^J^MStart your Ymodem download now.}
  137.         {EXEC-D %protodir%%dszprog port %_por ha both sb -k %files}
  138.         {COMP %_err,0}
  139.         {RETURN}
  140.  
  141. {:send_xmodem}                              * XMODEM-1K download subroutine
  142.         {SEND ^J^MStart your Xmodem download now.}
  143.         {IFEX %files,,SX1}
  144.         {SXMO-K %files}
  145.         {COMP %_err,0}
  146. {:SX1}  {RETURN}
  147.  
  148. {:recv_hslink}                              * HSLINK upload subroutine
  149.         {SEND ^J^MStart your HS/Link upload now.}
  150.         {EXEC-D %protodir%HSLINK.EXE -p%_por -u%filedir}
  151.         {COMP %_err,0}
  152.         {RETURN}
  153.  
  154. {:recv_zmodem}                              * ZMODEM upload subroutine
  155.         {SEND ^J^MStart your Zmodem upload now.}
  156.         {EXEC-D %protodir%%dszprog port %_por ha both rz %files}
  157.         {COMP %_err,0}
  158.         {RETURN}
  159.  
  160. {:recv_ymodem}                              * YMODEM upload subroutine
  161.         {SEND ^J^MStart your Ymodem upload now.}
  162.         {EXEC-D %protodir%%dszprog port %_por ha both rb -k %files}
  163.         {COMP %_err,0}
  164.         {RETURN}
  165.  
  166. {:recv_xmodem}                              * XMODEM-1K upload subroutine
  167.         {SEND ^J^MStart your Xmodem upload now.}
  168.         {RXMO-K %files}
  169.         {COMP %_err,0}
  170.         {RETURN}
  171.  
  172. {:transfer_file}                            * Transfer a file upload & download
  173.         {COMP proto,sz} {IFCO send_zmodem}  * IN: %proto
  174.         {COMP proto,sy} {IFCO send_ymodem}  *   s + %protocol for downloads
  175.         {COMP proto,sk} {IFCO send_xmodem}  *   r + %protocol for uploads
  176.         {COMP proto,sh} {IFCO send_hslink}
  177.         {COMP proto,rz} {IFCO recv_zmodem}
  178.         {COMP proto,ry} {IFCO recv_ymodem}
  179.         {COMP proto,rk} {IFCO recv_xmodem}
  180.         {COMP proto,rh} {IFCO recv_hslink}
  181.         {SEND ^J^MInvalid protocol ^J^M}
  182.         {CALL press_any_key}
  183.         {COMP proto,sz}                     * Set a bad condition for return
  184. {:DL1}  {SETV proto}
  185.         {RETURN}
  186.  
  187. {:get_name}
  188. {:GN1}  {SEND ^J^MEnter your real name: }   * Get a name from user
  189.         {SETG %inact_time,time_out}         * OUT: %lname
  190.         {GETS lname,16,GN1}
  191.         {RETURN}
  192.  
  193. {:get_password}                             * Get a password
  194.         {SETG %inact_time,time_out}
  195. {:GP1}  {GETS-P pass,8}
  196.         {RETURN}
  197.  
  198. {:time_out}                                 * Time out user
  199.         {POPS-C}                            * Clear the stack
  200.         {GOTO gby}
  201.  
  202. {:write_user}                               * Write the user file
  203.         {WOPE %datadir%%password.MHS}       * IN: %login_name
  204.         {WRIT %login_name}                  * IN: %userno
  205.         {WRIT %userno}                      * IN: %new_start
  206.         {WRIT %new_start}                   * IN: %protocol
  207.         {WRIT %protocol}
  208.         {WCLO}
  209.         {RETURN}
  210.  
  211. {:read_user}                                * Read the user file
  212.         {ROPE %datadir%%password.MHS,RU1}   * OUT: %login_name
  213.         {READ %login_name}                  * OUT: %userno
  214.         {READ %userno}                      * OUT: %new_start
  215.         {READ %new_start}                   * OUT: %protocol
  216.         {READ %protocol}
  217.         {RCLOSE}
  218. {:RU1}  {RETURN}
  219.  
  220. {:write_data}                               * Write data file
  221.         {WOPE %datadir%DATA.MHS}            * IN: %userno
  222.         {WRIT %userno}                      * IN: %mhigh
  223.         {WRIT %mhigh}
  224.         {WCLO}
  225.         {RETURN}
  226.  
  227. {:read_data}                                * Read data file
  228.         {ROPE %datadir%DATA.MHS,RD1}        * OUT: %userno
  229.         {READ %userno}                      * OUT: %mhigh
  230.         {READ %mhigh}
  231.         {RCLO}
  232. {:RD1}  {RETURN}
  233.  
  234. --------------------------------------------* Login functions -----------------
  235.  
  236. {:new_user}                                 * Get new user information
  237.         {CALL cls}                          * OUT: %login_name
  238. {:NU4}                                      * OUT: %password
  239.                                             * OUT: %userno
  240.         {SEND Welcome to the host with the most.  Enter your name and password.^J^M}
  241. {:NU0}  {CALL get_name}                     * OUT: %new_start
  242.         {SETV login_name,%lname}            * OUT: %protocol
  243.         {SETV lname}
  244.  
  245. {:NU1}  {SEND ^J^MEnter your password: }
  246.         {GETS password,8,NU0}
  247.         {IFEX %datadir%%password.MHS,,NU3}
  248.         {SEND ^J^MInvalid password, try something different.}
  249.         {GOTO NU1}
  250.  
  251. {:NU3}  {INCR userno}
  252.  
  253.         {SETV new_start,1}
  254.         {CALL get_protocol}
  255.         {SEND ^J^MSaving user information.}
  256.         {CALL write_user}
  257.         {SEND ^J^MRe-enter your name and password for verification.}
  258.         {RETURN}
  259.  
  260. {:login_user}                               * Login user
  261.         {PUSH}                              * OUT: %SUCCESS
  262.         {SETV SUCCESS}                      * OUT: %login_name
  263.         {SETV tries,0}                      * OUT: %password
  264. {:LU0}  {INCR tries}                        * OUT: %userno
  265.         {COMP tries,3}  {IFCO-G LU4}        * OUT: %new_start
  266.                                             * OUT: %protocol
  267.         {SEND ^J^Mlogin: }
  268.         {SETG %inact_time,time_out}
  269.         {GETS lname,16,LU0}
  270.  
  271.         {COMP lname,new}  {IFCO new_user}
  272.  
  273.         {SEND ^J^Mpassword: }
  274.         {CALL get_password}
  275.         {SETV password,%pass}
  276. {:LU2}  {SEND ^J^M}
  277.         {IFEX %datadir%%password.MHS,,LU0}
  278.         {CALL read_user}
  279.         {COMP login_name,%lname}
  280.         {IFCO ,LU0}
  281.  
  282.         {SETV SUCCESS,true}
  283.  
  284. {:LU4}  {SETV tries}
  285.         {SETV lname}
  286.         {SETV pass}
  287.         {POPS}
  288.         {RETURN}
  289.  
  290. --------------------------------------------* Dos functions--------------------
  291.  
  292. {:change_dir}                               * Change Dir
  293.         {SEND ^J^MCD }
  294.         {SETG %inact_time,time_out}
  295.         {GETS cd,70,CD1}
  296.         {EXEC-N CD %cd}
  297. {:CD1}  {SETV cd}
  298.         {RETURN}
  299.  
  300. {:do_dir}                                   * Directory
  301.         {CALL cls}
  302.         {SEND ^J^MDIR }
  303.         {SETG %inact_time,time_out}
  304.         {GETS dir,70}
  305.         {EXEC-N DIR %dir > %datadir%DIR.TMP}
  306.         {SETV dump_file,%datadir%DIR.TMP}
  307.         {CALL dsp_file}
  308.         {CALL press_any_key}
  309.         {SETV dir}
  310.         {RETURN}
  311.  
  312. {:type_file}                                * Type a file
  313.         {CALL cls}
  314.         {SEND ^J^MTYPE }
  315.         {SETG %inact_time,time_out}
  316.         {GETS type,70,TF1}
  317.         {SEND ^J^M}
  318.         {SETV dump_file,%type}
  319.         {CALL dsp_file}
  320.         {CALL press_any_key}
  321. {:TF1}  {SETV type}
  322.         {RETURN}
  323.  
  324. {:erase_file}                               * Erase a file
  325.         {SEND ^J^M^J^M(CR to abort)}
  326.         {SEND ^J^MERASE }
  327.         {SETG %inact_time,time_out}
  328.         {GETS erase,70,EF1}
  329.         {IFEX %erase,,EF2}
  330.         {SEND ^J^MErase %erase (Y/N): }
  331. {:EF3}  {GETS-H ch,1,EF3}
  332.         {COMP ch,y} {IFCO ,erase_file}
  333.         {EXEC-N ERASE %erase > nul}
  334.         {GOTO EF1}
  335. {:EF2}  {SEND ^J^MFile not found.}
  336.         {GOTO erase_file}
  337. {:EF1}  {SETV erase}
  338.         {RETURN}
  339.  
  340. {:copy_file}                                * Copy a file
  341.         {SEND ^J^MCOPY }
  342.         {SETG %inact_time,time_out}
  343.         {GETS copy,70,CF1}
  344.         {EXEC-N COPY %copy > nul}
  345. {:CF1}  {SETV copy}
  346.         {RETURN}
  347.  
  348. {:rename_file}                              * Rename a file
  349.         {SEND ^J^MREN }
  350.         {SETG %inact_time,time_out}
  351.         {GETS ren,70,RF1}
  352.         {EXEC-N REN %ren > nul}
  353. {:RF1}  {SETV ren}
  354.         {RETURN}
  355.  
  356. {:exit_to_dos}                              * Exit to dos with DOORWAY.EXE
  357.         {COMP mspeed,local}
  358.         {IFCO EX1}
  359.         {EXEC DOORWAY COM%_por /M:60 /G:ON /A:ON /V:D^U /O:T /S:* /C:DOS}
  360.         {GOTO EX2}
  361. {:EX1}  {SHELL}
  362. {:EX2}  {RETURN}
  363.  
  364. {:dos_download}                             * Download a file
  365.         {SETV proto}                        * IN: %protocol
  366.         {SEND ^J^MFile: }
  367.         {SETG %inact_time,time_out}
  368.         {GETS files,70,DD1}
  369.         {COMP protocol,}
  370.         {IFCO ,DD0}
  371.         {CALL get_protocol}
  372. {:DD0}  {SETV proto,s%protocol}
  373.         {CALL transfer_file}
  374.         {IFCO DD1}
  375.         {SEND ^J^MUnsuccessfull download}
  376.         {CALL press_any_key}
  377. {:DD1}  {SETV files}
  378.         {RETURN}
  379.  
  380. {:dos_upload}                               * Upload a file
  381.         {SETV proto}                        * IN: %protocol
  382.         {SEND ^J^MFile: }
  383.         {SETG %inact_time,time_out}
  384.         {GETS files,70,DU1}
  385.         {COMP protocol,}
  386.         {IFCO ,DU0}
  387.         {CALL get_protocol}
  388. {:DU0}  {SETV proto,r%protocol}
  389.         {CALL transfer_file}
  390.         {IFCO DU1}
  391.         {SEND ^J^MUnsuccessfull upload}
  392.         {CALL press_any_key}
  393. {:DU1}  {SETV files}
  394.         {RETURN}
  395.  
  396. {:log_drive}                                * Log a drive
  397.         {SEND ^J^MChange to which drive (A:, B:, C:, etc): }
  398.         {SETG %inact_time,time_out}
  399.         {GETS log,2,LD2}
  400. {:LD1}  {SEND ^J^MChange to drive %log (Y/N)? }
  401.         {SETG %inact_time,time_out}
  402.         {GETS-H ch,1,LD1}
  403.         {COMP ch,n}  {IFCO LD2}
  404.         {COMP ch,y}  {IFCO ,LD1}
  405.         {EXEC-N %log}
  406. {:LD2}  {SETV log}
  407.         {RETURN}
  408.  
  409. {:dos_stuff}                                * Dos Menu
  410.         {SEND ^J^MDos password: }
  411.         {CALL get_password}
  412.         {COMP pass,%dospassword}
  413.         {IFCO ,DS3}
  414.         {PUSH}
  415. {:DS1}
  416.         {CALL cls}
  417.         {SEND ┌───────────────────────────────────────────────────┐^J^M}
  418.         {SEND │                   DOS Commands                    │^J^M}
  419.         {SEND └───────────────────────────────────────────────────┘^J^M}
  420.         {SEND  [A] Log New Drive^J^M}
  421.         {SEND  [C] Change Dir       [U] Upload to current dir^J^M}
  422.         {SEND  [D] Directory        [V] Download from current dir^J^M}
  423.         {SEND  [E] Erase File^J^M}
  424.         {SEND  [K] Copy File        [Z] Shell to DOS    (from local)^J^M}
  425.         {SEND  [T] Type File            Run DOORWAY.EXE (from remote)^J^M}
  426.         {SEND  [R] Rename File^J^M^J^M}
  427.         {SETV prompt,DOS (CR to return)}
  428.         {CALL menu}
  429.  
  430.         {COMP ch,~}   {IFCO DS2}
  431.         {COMP ch,a}   {IFCO log_drive}
  432.         {COMP ch,c}   {IFCO change_dir}
  433.         {COMP ch,d}   {IFCO do_dir}
  434.         {COMP ch,e}   {IFCO erase_file}
  435.         {COMP ch,k}   {IFCO copy_file}
  436.         {COMP ch,r}   {IFCO rename_file}
  437.         {COMP ch,t}   {IFCO type_file}
  438.         {COMP ch,u}   {IFCO dos_upload}
  439.         {COMP ch,v}   {IFCO dos_download}
  440.         {COMP ch,z}   {IFCO exit_to_dos}
  441.  
  442.         {GOTO DS1}
  443. {:DS2}  {POPS}
  444. {:DS3}  {SETV pass}
  445.         {SETV prompt}
  446.         {RETURN}
  447.  
  448. --------------------------------------------* Xfer functions-------------------
  449.  
  450. {:dfiles}                                   * Download a file
  451.         {SETV proto}                        * IN/OUT: %protocol
  452.         {SEND ^J^MFile: }
  453.         {SETG %inact_time,time_out}
  454.         {GETS files,70,DX1}
  455.         {SETV files,%filedir%%files}
  456.         {COMP protocol,}
  457.         {IFCO ,DX0}
  458.         {CALL get_protocol}
  459. {:DX0}  {SETV proto,s%protocol}
  460.         {CALL transfer_file}
  461.         {IFCO DX1}
  462.         {SEND ^J^MUnsuccessfull download}
  463.         {CALL press_any_key}
  464. {:DX1}  {SETV files}
  465.         {RETURN}
  466.  
  467. {:ufiles}                                   * Upload a file
  468.         {SETV proto}                        * IN/OUT: %protocol
  469.         {SEND ^J^MFile: }                   * OUT: FILES.TXT (text file)
  470.         {SETG %inact_time,time_out}
  471.         {GETS dfiles,70,UF1}
  472.         {SETV files,%filedir%%dfiles}
  473.         {IFEX %files,,UF3}
  474.         {SEND ^J^MFile already exists!^J^M}
  475.         {CALL Press_Any_Key}
  476.         {GOTO UF1}
  477. {:UF3}  {COMP protocol,}
  478.         {IFCO ,UF0}
  479.         {CALL get_protocol}
  480. {:UF0}  {SETV proto,r%protocol}
  481.         {CALL transfer_file}
  482.         {IFCO UF1}
  483.         {SEND ^J^MUnsuccessfull upload}
  484.         {CALL press_any_key}
  485. {:UF1}  {SETV files}
  486.         {SETV dfiles}
  487.         {RETURN}
  488.  
  489. -------------------------------------------------------------------------------
  490.  
  491. {:chat}                                      * Chat w/word wrap
  492.         {SETG inact_time,time_out}
  493.         {BEEP} {BEEP} {BEEP}
  494.         {SETV chatc,3}
  495.         {SEND ^J^M^J^M(Type 'bye' to exit chat mode)^J^M}
  496.         {SEND ^J^M1> Hi %login_name, what's up?}
  497.         {SEND ^J^M2>}
  498. {:CT1}  {SETV chatl}
  499. {:CT2}  {SEND ^J^M%chatc> %chatl}
  500.         {INCR chatc}
  501.         {GETS-AH chatl,70}
  502.         {COMP chatl,bye}  {IFCO CT5}
  503.         {LENGTH %chatl}
  504.         {COMP %_len,65}  {IFCO-LE CT1}
  505.         {SETV x,70}
  506. {:CT3}  {DECR x}
  507.         {COMP x,50}  {IFCO-LE CT1}
  508.         {SUBS ch,%x,1,%chatl}
  509.         {COMP ch, }       {IFCO ,CT3}
  510.         {INCR x}
  511.         {SUBS chatl,%x,255,%chatl}
  512. {:CT4}  {COMP x,%_len}  {IFCO-G CT2}
  513.         {SEND ^H ^H}
  514.         {INCR x}
  515.         {GOTO CT4}
  516. {:CT5}  {RETURN}
  517.  
  518. -------------------------------------------------------------------------------
  519.  
  520. {:time_online}                              * Elapsed time
  521.         {SEND ^J^MTime online: %_elap minutes^J^M}
  522.         {CALL Press_Any_Key}
  523.         {RETURN}
  524.  
  525. --------------------------------------------* User info------------------------
  526.  
  527. {:chg_name}                                 * Get new login name
  528.         {SEND ^J^M}                         * OUT: %lname
  529. {:CN1}  {CALL get_name}
  530.         {RETURN}
  531.  
  532. {:chg_password}                             * Get new password
  533.         {SEND ^J^M}                         * OUT: %pass
  534. {:CP1}  {SEND ^J^MNew password: }
  535.         {SETG %inact_time,time_out}
  536.         {GETS pass,8,CP1}
  537.  
  538.         {COMP pass,%password}   {IFCO CP2}
  539.  
  540.         {IFEX %datadir%%pass.MHS,,CP2}
  541.         {SEND ^J^MInvalid password, try again.}
  542.         {GOTO CP1}
  543.  
  544. {:CP2}  {RETURN}
  545.  
  546. {:chg_protocol}                             * Get new protocol
  547.         {CALL cls}                          * OUT: %protocol
  548.         {CALL get_protocol}
  549.         {RETURN}
  550.  
  551. {:save_user}                                * Save new information
  552.         {SEND ^J^MSaving}                   * IN: %lname,%pass,%protocol
  553.         {IFEX %datadir%%password.MHS,,SU1}  * OUT: %login_name,%password
  554.         {EXEC-N DEL %datadir%%password.MHS} * OUT: %new_start,%uport
  555. {:SU1}  {SETV login_name,%lname}
  556.         {SETV password,%pass}
  557.         {SETV uprot,%protocol}
  558.         {CALL write_user}
  559.         {RETURN}
  560.  
  561. {:fil_dir}
  562.         {EXEC-N DIR %filedir > %datadir%DIR.TMP}
  563.         {SETV dump_file,%datadir%DIR.TMP}
  564.         {CALL dsp_file}
  565.         {CALL press_any_key}
  566.         {RETURN}
  567.  
  568. {:update_info}                              * User info menu
  569.         {SETV lname,%login_name}
  570.         {SETV pass,%password}
  571.         {SETV uprot,%protocol}
  572.         {PUSH}
  573. {:UI1}  {CALL cls}
  574.         {SEND ^J^M}
  575.         {SEND ^J^M1.  User name: %lname}
  576.         {SEND ^J^M2.   Password: %pass}
  577.         {SEND ^J^M3.   Protocol: %protocol}
  578.         {SEND ^J^M}
  579.         {SEND ^J^MCommand (CR to return) [%_tim]: }
  580.         {SETG %inact_time,time_out}
  581.         {GETS-H ch,1,UI2}
  582.  
  583.         {COMP ch,1}  {IFCO chg_name}
  584.         {COMP ch,2}  {IFCO chg_password}
  585.         {COMP ch,3}  {IFCO chg_protocol}
  586.         {GOTO UI1}
  587.  
  588. {:UI2}  {SEND ^J^MSave changes? }
  589.         {GETS-H ch,1,UI3}
  590.         {COMP ch,n} {IFCO UI3}
  591.         {COMP ch,y} {IFCO ,UI2}
  592.         {CALL save_user}
  593. {:UI3}  {POPS}
  594.         {SETV ch}
  595.         {SETV lname}
  596.         {SETV pass}
  597.         {SETV protocol,%uprot}
  598.         {RETURN}
  599.  
  600. -------------------------------------------------------------------------------
  601.  
  602. {:main_menu}                                * Main menu
  603.         {PUSH}
  604. {:MM1}
  605.         {CALL cls}
  606.         {SEND ┌───────────────────────────────────────────────────┐^J^M}
  607.         {SEND │                    Main Menu                      │^J^M}
  608.         {SEND └───────────────────────────────────────────────────┘^J^M}
  609.         {SEND       [D] Download Files        [T] Time online^J^M}
  610.         {SEND       [U] Upload Files          [G] Goodbye^J^M}
  611.         {SEND       [F] File List             [S] DOS Menu^J^M}
  612.         {SEND       [C] Chat                  [I] User Info^J^M}
  613.         {SEND       [P] Protocol (%protocol)^J^M^J^M}
  614.         {SETV prompt,Main Menu}
  615.         {CALL menu}
  616.  
  617.         {COMP ch,c}   {IFCO chat}
  618.         {COMP ch,f}   {IFCO fil_dir}
  619.         {COMP ch,s}   {IFCO dos_stuff}
  620.         {COMP ch,g}   {IFCO MM3}
  621.         {COMP ch,t}   {IFCO time_online}
  622.         {COMP ch,i}   {IFCO update_info}
  623.         {COMP ch,d}   {IFCO dfiles}
  624.         {COMP ch,p}   {IFCO get_protocol}
  625.         {COMP ch,u}   {IFCO ufiles}
  626.         {GOTO MM1}
  627.  
  628. {:MM3}  {SEND ^J^MAre you sure (y/n)? }
  629.         {GETS-H ch,1,MM1}
  630.         {COMP ch,y}   {IFCO ,MM1}
  631.  
  632. {:MM2}  {POPS}
  633.         {RETURN}
  634.  
  635. --------------------------------------------* Waiting for a call funcs--------
  636.  
  637. {:view_scroll}
  638.         {SCROLL}
  639.         {GOTO wait_for_call}
  640.  
  641. {:shell_dos}
  642.         {SHELL}
  643.         {GOTO wait_for_call}
  644.  
  645. {:wait_for_call}
  646.         {CLEAR}
  647.         {DISP 1, 1,4E,                                  HOST MODE                                     }
  648.  
  649.         {DISP 3, 1,0E,                                       The Host with the Most}
  650.         {DISP 4, 1,0E,  1 - Login locally                          By Shad Muegge}
  651.         {DISP 5, 1,0E,  2 - View Scrollback
  652.         {DISP 6, 1,0E,  3 - Shell to DOS                            ____}
  653.         {DISP 7, 1,0E,                                    -------^|\/ o  \------------------}
  654.         {DISP 8, 1,0E,  Q - Quit                             ____^|    ,__^| Association of}
  655.         {DISP 9, 1,0E,                                      /  o \/^|____/  Babble Fish}
  656.         {DISP 10,1,0E,                                     ^|__,    ^|____   Programmers}
  657.         {DISP 11,1,0E,                                      \____^|\/ o  \}
  658.         {DISP 12,1,0E,                                           ^|    ,__^| MEMBER}
  659.         {DISP 13,1,0E,                                    -------^|/\____/------------------}
  660.  
  661.         {DISP 20,1,0E,  Last user: %login_name (%mspeed)}
  662.  
  663. {:WF0}  {DISP 23,30,4e, Waiting for a Call }
  664.         {DISP 15,1,,                               }
  665.         {DISP 15,1,0E,  Command: }
  666.         {SETG ,,l}
  667. {:WF1}  {GETS mring,10,WF1}
  668.         {COMP mring,1}              {IFCO WF2}
  669.         {COMP mring,2}              {IFCO view_scroll}
  670.         {COMP mring,3}              {IFCO shell_dos}
  671.         {COMP mring,q}              {IFCO WF3}
  672.         {COMP mring,%ring_string}   {IFCO ,WF0}
  673.  
  674.         {SEND ~ATA^M~}
  675.  
  676.         {SETL 45,wait_for_call}
  677.         {DISP 17,1,7,  Waiting for connect: }
  678.         {GOLO C300,%connect_string^M}
  679.         {GOLO C120,%connect_string 1200^M}
  680.         {GOLO C240,%connect_string 2400^M}
  681.         {GOLO C480,%connect_string 4800^M}
  682.         {GOLO C960,%connect_string 9600^M}
  683.         {GOLO C192,%connect_string 19200^M}
  684.         {LOOK %connect_string 38400^M}
  685.         {SETV mspeed,38400}
  686.         {GOTO wait_out}
  687.  
  688. {:C300} {SETV mspeed,300}  {GOTO wait_out}
  689. {:C120} {SETV mspeed,1200} {GOTO wait_out}
  690. {:C240} {SETV mspeed,2400} {GOTO wait_out}
  691. {:C480} {SETV mspeed,4800} {GOTO wait_out}
  692. {:C960} {SETV mspeed,9600} {GOTO wait_out}
  693. {:C192} {SETV mspeed,19200}
  694.  
  695. {:wait_out}
  696.         {COMP autobaud,n}   {IFCO WO1}
  697.         {PARM %mspeed}
  698. {:WO1}  {RETURN}
  699.  
  700. {:WF2}  {SETV mspeed,LOCAL}
  701.         {local y}
  702.         {SPOC n}
  703.         {RETURN}
  704.  
  705. {:WF3}  {CLEAR}
  706.      Clean up variables
  707.  
  708.         {SETV userno}     {SETV mring}      {SETV filedir}   {SETV mspeed}
  709.         {SETV new_start}  {SETV login_name} {SETV password}  {SETV dump_file}
  710.         {SETV password}   {SETV protocol}   {SETV prompt}    {SETV ch}
  711.         {SETV datadir}    {SETV dospassw}   {SETV protodir}  {SETV autobaud}
  712.         {SETV mhigh}      {SETV chatc}      {SETV chatl}     {SETV x}
  713.         {SETV inact_time} {SETV proto}      {SETV uprot}
  714.         {SETV connect_string}  {SETV attention_string}  {SETV ring_string}
  715.  
  716.         {LOCA n}
  717.         {MACL COMMO.MAC}
  718.  
  719. --------------------------------------------* Main BBS loop ------------------
  720.  
  721. {:BBS}
  722.         {CALL setup}
  723.         {CALL Wait_For_Call}
  724.  
  725.         {CALL cls}
  726.         {SETV userno}
  727.         {SEND ^J^M                                  HOST MODE^J^M^J}
  728.         {SEND                        Written in ^(COMMO^) macro language^J^M^J^J}
  729.         {SEND New users type 'NEW'^J^M^J^M}
  730.         {CALL read_data}
  731.         {CALL login_user}
  732.  
  733.         {COMP success,TRUE}
  734.         {IFCO ,gby}
  735.  
  736. {:BB0}  {ELAP}
  737.         {CALL main_menu}
  738.  
  739. {:gby}
  740.         {SEND ^J^M^JThanks for calling...^J^M}
  741.         {HANG y}
  742.         {COMP success,TRUE}
  743.         {IFCO ,hng}
  744.         {SEND Saving}
  745.         {CALL write_user}
  746.         {CALL write_data}
  747. {:hng}  {SETV success}
  748.         {GOTO BBS}
  749.